<html>
<head>
<title>Blah</title>
<script src="jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
	var path = getUrlVars()["path"];

        $.getJSON('jsonCallBack.php?path=' + path, function(data) {
			$.each(data.layers, function(i,item){
				$('#comments').append('<span id = ' + 'span_'+ item.username + ' style="display:none"><p>'+item.username+': '+item.comment+'</p></span>');
				

			   
			  });
		});

});


</script>
<script>
function displayComment(name){
		$("[id*=span_]").hide();
		$('#span_'+name).show();
};
function getUrlVars()	{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}
</script>

</head>
<body>
<h1>Layers</h1>
<div id="svg" style="float:left;clear:none">
<object type="image/svg+xml" data="layer_merge.php?path=<?php echo htmlentities($_GET['path']) ?>" width="auto" height="auto"></object>
</div>
<div id="comments">

</div>

</body>
</html>

	

